home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Dr. Windows 3
/
dr win3.zip
/
dr win3
/
PROGRAMR
/
FOYEH201.ZIP
/
FOYEH1.PAS
< prev
next >
Wrap
Pascal/Delphi Source File
|
1993-10-04
|
9KB
|
240 lines
{*** TURBO PASCAL UNIT: INTERFACE TO FOYEH1.DLL **}
{*** Released into the public domain by Dr. A. Olowofoyeku **}
{*** If anyone can convert this into a C/C++ HEADER file **}
{*** please do so, and please send me a copy of the header **}
{*** file. **}
{*** Documentation for the routines in the DLL is supplied in **}
{*** the file FOYEH1.INT **}
{*** The Dynamic Link Library FOYEH1.DLL is supplied with **}
{*** many of my Windows and Win-OS/2 programs. I am constantly **}
{*** developing and updating it. If you have any problems or **}
{*** discover any bugs while using it with your own programs **}
{*** please mail me, and I will try and fix it. NOTE: however **}
{*** that I do not make any warranties concerning my FOYEH1.DLL **}
{*** or this interface UNIT to it. Everybody uses both of them **}
{*** at their own risk. The DLL itself is already widely **}
{*** available. I am only releasing the interface to it, so **}
{*** that others may benefit from some of its routines. **}
{*** NOTE: that some of the routines in the DLL require the **}
{*** presence of Borland's BWCC.DLL. If you are a TPW/BP7 user **}
{*** you already have this DLL. However, most of the routines **}
{*** do not require BWCC.DLL. You can normally tell from the **}
{*** name of the routine whether it uses any call from BWCC.DLL **}
{*** Note also, that if you have an old version of FOYEH1.DLL **}
{*** then some of the routines may not be available. **}
{*** ALL THE FOUR FILES (i.e., FOYEH1.DLL, FOYEH1.PAS, **}
{*** FOYEH1.INT, and FOYEH1.SUM) MUST BE INCLUDED IN ANY **}
{*** DISTRIBUTION. **}
{~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~}
{ Dr. A. Olowofoyeku }
{ 268 Horwood }
{ Newcastle }
{ Staffs ST5 5BQ, }
{ England. }
{ }
{ E-mail:laa12@seq1.keele.ac.uk }
{ }
{ October 1993. }
{~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~}
UNIT Foyeh1;
{*** This unit has 40 routines **}
INTERFACE
{$F+,G+}
USES
Wintypes;
Type
String79 = String[79];
StringArray = Array[1..20] of String79;
{-----------------------------------------------------------------------}
Function DllVersion : Word;
Function GetS(Prompt : String) : String;
Function ShowDir : String79;
Procedure ErrorMessage(Caption, Msg : PChar);
Procedure BWCCErrorMessage(Caption, Msg : PChar; Extra : Word);
Procedure ModalMessageBox(Caption, Msg : PChar);
Function Confirm(Caption, Msg : PChar) : Boolean;
Function BwccConfirm(Caption, Msg : PChar) : Boolean;
Function ConfirmModal(Caption,Msg : PChar) : Boolean;
Function ExistOnPath(FName : String79; Var Dest : String79) : Boolean;
Function Exist(Var Fname : String79) : Boolean;
Function FSize(FName : String79) : LongInt;
Function HasWildCards(s : String) : Boolean;
Function IsDirectory(var MyDir : string79): Boolean;
Function IsCommand(Command : String79) : String79;
Function GetDriver : String79;
Procedure Wait;
Procedure Pause;
Function DeleteFile(FName : String) : Boolean;
Function CopyFile(Source, Dest : String79) : Boolean;
Function StUpcase(S : String) : String;
function Getlabel(drive : char) : string79;
Function LabelDrive(Drive, NewLabel : string79) : Boolean;
Function PlaySoundFile(sFile : String) : Boolean;
Function FileOpen(Wnd : HWnd; Caption, DefExt : String) : String79;
Function GetFileName(Wind : HWND; Caption, Mask : String79) : String79;
Function GetIniEntry(Title, INIfile : String79) : String79;
Function SystemDirectory : String;
Function WindowsDirectory : String;
Function SaveWinDesktop(FName : String) : Boolean;
Function RestoreWinDesktop(FName : String) : Boolean;
Function Str2Byte(S : string; var B : Byte) : Boolean;
Function Str2Int(S : string; var I : Integer) : Boolean;
Function Str2Word(S : string; var W : Word) : Boolean;
Function Str2Long(S : string; var L : LongInt) : Boolean;
Function Str2Real(S : string; var R : Real) : Boolean;
Function Trim(S : string) : string;
Function AddBackSlash(DirName : String79) : String79;
Function ConcatFiles (Var First, Second, Dest : String79)
: Boolean;
Function SplitString (Var Source : String; Var StArray : StringArray)
: Byte;
(***********************************************************************)
(***********************************************************************)
(******* END OF INTERFACE SECTION ***********************************)
(***********************************************************************)
IMPLEMENTATION
{-----------------------------------------------------}
Function DllVersion : Word; {* this DLL version *}
External 'FOYEH1' index 200;
Function GetS(Prompt : String) : String;
External 'FOYEH1' index 1;
Function ShowDir : String79;
External 'FOYEH1' index 2;
Procedure ErrorMessage(Caption,Msg : PChar);
External 'FOYEH1' index 4;
Function Confirm(Caption,Msg : PChar) : Boolean;
External 'FOYEH1' index 5;
Function ExistOnPath(FName : String79; Var Dest : String79) : Boolean;
External 'FOYEH1' index 6;
Function Exist(Var Fname : String79) : Boolean;
External 'FOYEH1' index 7;
Function FSize(FName : String79) : LongInt;
External 'FOYEH1' index 8;
Function HasWildCards(s : String) : Boolean;
External 'FOYEH1' index 9;
Function IsDirectory(var MyDir : string79): Boolean;
External 'FOYEH1' index 10;
Function IsCommand(Command : String79) : String79;
External 'FOYEH1' index 11;
Function GetDriver : String79;
External 'FOYEH1' index 12;
Procedure Wait;
External 'FOYEH1' index 13;
function Str2Byte(S : string; var B : Byte) : Boolean;
External 'FOYEH1' index 14;
function Str2Int(S : string; var I : Integer) : Boolean;
External 'FOYEH1' index 15;
function Str2Word(S : string; var W : Word) : Boolean;
External 'FOYEH1' index 16;
function Str2Long(S : string; var L : LongInt) : Boolean;
External 'FOYEH1' index 17;
function Str2Real(S : string; var R : Real) : Boolean;
External 'FOYEH1' index 18;
function Trim(S : string) : string;
External 'FOYEH1' index 21;
function AddBackSlash(DirName : String79) : String79;
External 'FOYEH1' index 26;
Function CopyFile(Source, Dest : String79) : Boolean;
External 'FOYEH1' index 29;
Function DeleteFile(FName : String) : Boolean;
External 'FOYEH1' index 30;
Function StUpcase(S : String) : String;
External 'FOYEH1' index 31;
function getlabel(drive : char) : string79;
External 'FOYEH1' index 32;
Function LabelDrive(Drive, NewLabel : string79) : Boolean;
External 'FOYEH1' index 33;
Function PlaySoundFile(sFile : String) : Boolean;
External 'FOYEH1' index 34;
Function ConfirmModal(Caption,Msg : PChar) : Boolean;
External 'FOYEH1' index 35;
Procedure ModalMessageBox(Caption,Msg : PChar);
External 'FOYEH1' index 36;
Procedure BWCCErrorMessage(Caption,Msg : PChar; Extra : Word);
External 'FOYEH1' index 37;
Procedure Pause;
External 'FOYEH1' index 38;
Function Fileopen(Wnd : HWnd; Caption, DefExt : String) : String79;
External 'FOYEH1' index 39;
Function GetFileName(Wind : HWND; Caption, Mask : String79) : String79;
External 'FOYEH1' index 41;
F